package org.example.src.controller;

import org.example.src.dto.response.ApiResponse;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试Controller - 用于验证应用基础配置是否正确
 */
@RestController
@RequestMapping("/api/test")
public class TestController {

    /**
     * 健康检查接口
     * @return ResponseEntity
     */
    @GetMapping("/health")
    public ResponseEntity<ApiResponse<String>> healthCheck() {
        return ResponseEntity.ok(new ApiResponse<>(true, "服务运行正常", "OK"));
    }

    /**
     * 配置信息接口
     * @return ResponseEntity
     */
    @GetMapping("/config")
    public ResponseEntity<ApiResponse<String>> configInfo() {
        return ResponseEntity.ok(new ApiResponse<>(true, "配置信息",
                "应用名称: college-internship-management-system\n端口: 8080"));
    }
}
